home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MISC / UNIMODE / UNIMODE.ARC / !UniMode2_Manuals_UserGuide < prev    next >
Encoding:
Text File  |  1994-06-09  |  34.0 KB  |  876 lines

  1. User's Guide Contents                    
  2. ~~~~~~~~~~~~~~~~~~~~~
  3.          Terminology
  4.          Description of the application
  5.          Using UniMode2
  6.                 UniversalMode module and Enhancer states
  7.                 Getting information on modes (ModeInfo & TimeRaster)
  8.                 Extracting modes
  9.                 Editing a definition
  10.                 Compiling modes
  11.                 Saving MDFs and MDSs
  12.                 Loading modes
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  Terminology                    
  20.  ===========
  21.  
  22. The following terms are introduced with this package:
  23.  
  24. MDF or ModeDescriptionFile :
  25.   This is a file with the - Acorn approved - filetype &103. The VIDC- and
  26.   Workspacelists of a mode are stored in this file together with some
  27.   machine specific data. The UniversalMode module loads this file when you
  28.   use the ModeLoad command. An MDF can be recognized by it's icon and the
  29.   FileType: UniMode (&103).
  30.  
  31. MDS or ModeDescriptionScript :
  32.   This is a textfile. This file contains all the information of the
  33.   corresponding MDF in ASCII-format. This file can be edited to change
  34.   certain parameters or variables. After that you can compile the MDS into
  35.   an MDF. If you are going to edit the MDS, be warned that if you do not
  36.   know anything about programming the VIDC you may not like the result of
  37.   your venture. With UniMode2 the MDS has become somewhat obsolete since
  38.   you can now edit a modedefinition from the windows-contents.
  39.  
  40. VIDC Enhancer-Add-On:
  41.   With this is meant the third party products generally known as the
  42.   "VIDC Enhancer" which are available for 300/3000/400 series of machines
  43.   from several companies.
  44.  
  45. On-Board-Enhancer:
  46.   With this we mean the Enhancer-hardware built-in by Acorn in the 500/5000
  47.   series and (probably) future machines.
  48.  
  49. VidcEnhancer:
  50.   The term VidcEnhancer is used to refer to both the VIDC Enhancer-Add-On
  51.   and the On-Board-Enhancer.
  52.  
  53. Soft-mode
  54.   There are RISC OS modes and soft-modes. RISC OS modes are supplied by
  55.   RISC OS itself. Soft-modes are supplied by RAM-modules or other
  56.   applications. The term "Soft" refers to the fact that they are not in ROM.
  57.  
  58.  
  59.  
  60.  Description of the application          
  61.  ==============================
  62.  
  63. Read the file 'Install' for guidelines on installing your copy of !UniMode2
  64. on your system.
  65.  
  66. After you have installed it double-clicking on the !UniMode2-icon will
  67. install the application on the icon bar.
  68.  
  69. The application supports Acorn's Interactive Help. 
  70.  
  71. Shift-Double-click will open the application directory and reveal the
  72. following sub-directories:
  73.  
  74. <UniMode$Dir>.Manuals    contains this manual.
  75. <UniMode$Dir>.Modes      contains any MDFs that you have compiled or
  76.                          extracted.
  77. <UniMode$Dir>.ModeScript contains the script files.
  78. <UniMode$Dir>.Resources  contains the various utilities supplied with the
  79.                          package.
  80.  
  81. If you start the application it will install itself onto the icon bar.
  82.  
  83. Clicking SELECT over the icon bar icon will open the directory
  84. <UniModeMDF$Dir>. This directory contains the available
  85. ModeDescriptionFiles (MDF).
  86.  
  87. Clicking ADJUST over the icon bar icon will open the directory
  88. <UniModeMDS$Dir>. This directory contains the ModeDescriptionScripts (MDS).
  89.  
  90. Clicking MENU over the icon bar icon opens the application's menu.
  91.  
  92. The menu supplies the following options:
  93.  
  94.       Info        ⇨
  95.       Edit        ⇨
  96.       Save        ⇨
  97.       ModeInfo
  98.       Enhancer    ⇨
  99.       TimeRaster
  100.       Compile
  101.       Extract     ⇨
  102.       Quit
  103.  
  104.  
  105. * Choosing 'Quit' will remove the application from the icon bar. However,
  106.   the module and all mode definitions that have been loaded remain active
  107.   until you RMKill the module, switch off the machine or use *ModeClear to
  108.   remove a specific mode.
  109.  
  110. * 'Extract     ⇨' leads to a dialogue box. The dialogue box contains 127
  111.   numbered icons each representing one screenmode. A row of radio buttons
  112.   allows you to select a MonitorType. The large "Scan Modes" button allows
  113.   you to rescan the system to see if any new modes have been installed.
  114.   Refer to the chapter "Extracting modes" below for more information.
  115.  
  116. * Choosing 'Compile' will compile the MDF as it is defined in the windows. A
  117.   short log will be displayed. Refer to the chapter "Compiling modes" below
  118.   for more information.
  119.  
  120. * 'TimeRaster' displays the rastertime and rasterfrequency of the current
  121.   mode.
  122.  
  123. * 'Enhancer ⇨' leads to a sub-menu with the options On, Off, Auto,
  124.   Intelligent, Prefs and Quiet. Clicking on one of these options switches
  125.   the UniMode module in the corresponding state. The current state of the
  126.   module is reflected in the menu with a tick-mark. The state of the
  127.   VidcEnhancer is reflected through the last option in this menu. If the
  128.   VidcEnhancer is switched on by the module; the menu-item reads: 'Status:
  129.   On'. If the VidcEnhancer is switched off by the module then the menu-item
  130.   reads: 'Status: Off'. If the module is switched into its Quiet mode the
  131.   status of the VidcEnhancer is controlled by other software and hence is
  132.   unknown to the module. This is shown by the last menu-item as: 
  133.   'Status: ???'.
  134.   When the module doesn't know the state of the enhancer but isn't switched
  135.   into 'Quiet' mode the item will read 'Status: Unk'.  Refer to the chapter
  136.   entitled "UniversalMode module and Enhancer states" for more details. 
  137.  
  138. * Choosing 'ModeInfo' will display some vital information of the modes
  139.   currently installed.
  140.  
  141. * 'Save ⇨' leads to a submenu containing the items "MDF" and "Script". Both
  142.   items lead to a save-box allowing you to save the corresponding MDF or
  143.   MDS. Refer to the chapter "Saving MDFs and MDSs" for more information.
  144.  
  145. * 'Edit ⇨' leads to a submenu containing the items "Specs...",
  146.   "VidcRegs...", "ModeVars..." and "ID Text...". Choosing one of these items
  147.   opens a corresponding window which allows you to alter specific
  148.   characteristics of the mode under design. Refer to the chapter "Editing a
  149.   definition" for more information.
  150.  
  151.  
  152. * 'Info ⇨' leads to a standard information window. 
  153.  
  154.  
  155.  
  156. Using UniMode2
  157. ==============
  158.  
  159. Contents:
  160.  
  161.         UniversalMode module and Enhancer states
  162.         Getting information on modes (ModeInfo & TimeRaster)
  163.         Extracting modes
  164.         Editing a definition
  165.         Compiling modes
  166.         Saving MDFs and MDSs
  167.         Loading modes
  168.  
  169.  
  170.  
  171. Universal Mode module and Enhancer states
  172. -----------------------------------------
  173.  
  174. Before you are able to make your modes with UniMode2 you will need to know
  175. how the package works. The core of the package is the relocatable
  176. UniversalMode module. This module provides all the interfaces with the
  177. operating system.
  178.  
  179. The most important reason to write this module, was to gain full control
  180. over the VidcEnhancer, and getting rid of the "AutoVidc" program which was
  181. only partly a solution to the problems. You might look at the
  182. !UniMode2-package as an upgrade from "AutoVidc". The module provides 5 ways
  183. in controlling the VidcEnhancer:
  184.  
  185. *Vidc On           This command switches the VidcEnhancer on (36 MHz). The
  186.                    pixelrate of any mode is increased to 1.5 times of the
  187.                    default rate. This means that normal
  188.                    B(roadcast)S(tandard)-modes become real calm
  189.                    (50 -> 75 Hz). Or you can use much bigger modes at a
  190.                    respectable rasterfrequency.
  191.  
  192. *Vidc Off          This command switches the VidcEnhancer off.
  193.  
  194. *Vidc Auto         This command was implemented to emulate the SuperVidc
  195.                    Auto command and the AutoVidc control. Where SuperVidc
  196.                    uses a triggerlevel, or AutoVidc uses an internal table
  197.                    to determine whether the VidcEnhancer should be switched
  198.                    on or off, the module uses the VidcEnhancerbit in an MDF.
  199.                    Modes which are generated using Unimode2 can be
  200.                    programmed to switch the VidcEnhancer on or off (for
  201.                    details see the description on making an MDS). For
  202.                    standard RISC OS modes, you can load a "VidcOn" or a
  203.                    "VidcOff"-file on that mode. Example: if you want the
  204.                    VidcEnhancer to be switched on when entering mode 12 just
  205.                    type *Modeload VidcOn 12. 
  206.                    One minor set-back is that the VidcEnhancer will only be
  207.                    switched off if a "VidcOff" was loaded for another mode,
  208.                    or a *Vidc Off command is issued otherwise it will
  209.                    remain on after a modechange.
  210.  
  211. *Vidc Intelligent  This command switches the module to its "Intelligent"
  212.                    state. This means that a very complex algorithm is used,
  213.                    every time you select another mode, to determine whether
  214.                    the VidcEnhancer should be switched on or off. We have
  215.                    not (yet) found any mode that is judged incorrectly by
  216.                    the algorithm. This is also the default state.
  217.  
  218. *Vidc Prefs        *Vidc Prefs is a combination of all goodies, especially
  219.                    included for those who CAN get the Intelligent algorithm
  220.                    to fail. In this state the action taken by the module is
  221.                    modenumber-dependent: RISC OS 3 modes are switched on
  222.                    according to our own preferences. All other modes under
  223.                    96 will act as if the module is in its Intelligent-state.
  224.                    Modes from 96 to 111 will act as if the module is in its
  225.                    Auto-state. Modes from 112 to 119 will switch the
  226.                    VidcEnhancer on, the remaining modes from 120 to 127 will
  227.                    switch it off.
  228.  
  229. *Vidc Quiet        This command switches the module to its "Quiet" state.
  230.                    This means that the module will not affect the state of
  231.                    the VidcEnhancer. This allows other soft- or hardware to
  232.                    affect the state of the VidcEnhancer.
  233.  
  234. A little feedback from the module to the user might come in handy if you
  235. are busy programming MDF's. So the *Vidc Status command was included to
  236. return some information on the module- and VidcEnhancer-state.
  237.  
  238. Concerning modes, RISC OS 3 has one shortcomings, there is no command
  239. provided to set the mode used by the operating system. That is, until now;
  240. as it was implemented in the module:
  241.  
  242. *Mode <mode#>      Sets a new screen mode. Eg.: *mode 12
  243.  
  244. All you need to do, to use a soft-mode, is loading a ModeDescriptionFile
  245. (MDF) in the workspace of the module at the modenumber you want. This can be
  246. done by using the command:
  247.  
  248. *ModeLoad <filename> <mode#>
  249.  
  250. To remove a modedefinition from the list can be done by using the command:
  251.  
  252. *ModeClear <Mode#>
  253.  
  254. The mode <Mode#> will no longer be available from this module.
  255.  
  256. To see a list of the currently installed modes use the utility 'ModeInfo'.
  257.  
  258. NOTE: You can load an MDF at a modenumber which is already provided by
  259.       RISC OS itself under certain circumstances. Such an MDF is called an
  260.       'Overlay'. Refer to the file: 'Hints and Tips' for more details.
  261.  
  262. *HardwareRevision [<Revision#>]
  263.                 makes it possible to set the HardwareRevision manually in
  264.                 case the determination algorithm used in this module fails.
  265.                 Revision    Enhancer type
  266.                 -------------------------------------------------
  267.                 0           Atomwide compatible (IO1)
  268.                 1           Acorn On-Board      (eg. A540 A5000)
  269.                 2           SPEM compatible enhancer, mapped at IO1
  270.                 3           Atomwide compatible (IO2)
  271.  
  272.                 *HardwareRevision without a parameter echoes the current
  273.                 HardwareRevision set.
  274.  
  275. *VidcThreshold [<high> [<low>]]
  276.                 Refer to the file: 'Conversion'. <high> and <low> represent
  277.                 rastertimes in µs while the VidcEnhancer is switched off.
  278.                 This command controls the switching of the VidcEnhancer
  279.                 state. When the rastertime drops below <high> the
  280.                 VidcEnhancer will be switched on. When the rastertime
  281.                 becomes less than <low> the VidcEnhancer will be switched
  282.                 off. Normally the default values won't need to be changed.
  283.  
  284. Summary of Commands Syntax:
  285.  
  286.         *ModeLoad <FileName> <Mode#>
  287.         *ModeClear <Mode#>
  288.         *Mode [<Mode#>]>
  289.         *VIDC On|Off|Auto|Prefs|Intelligent|Quiet|Status
  290.          (Default: Intelligent)
  291.         *HardwareRevision [<Revision#>]
  292.         *VidcThreshold [<high> [<low>]]
  293.          (Default: high=20016; low=3632)
  294.  
  295.  
  296. NOTE    Because we did not know how to interface with the Watford-compatible
  297.         VidcEnhancer, this VidcEnhancer is not supported.
  298.         If YOU do know how to do this let us know so that we can update the
  299.         software.
  300.  
  301.  
  302.  
  303. Getting information on modes (ModeInfo & TimeRaster)
  304. ----------------------------------------------------
  305.  
  306. With UniMode2 come two small utilities. They can be found in the directory
  307. 'Resources'.
  308.  
  309. TimeRaster displays the RasterFrequency of the current mode. A similar
  310. function is available from the UniMode2 main menu. Choosing 'TimeRaster'
  311. will display the RasterFrequency (in Hz) and the RasterTime (in µs).
  312.  
  313. When you choose 'ModeInfo' from the UniMode2 menu ModeInfo is run in a
  314. TaskWindow. 'ModeInfo' gives some basic information about the modes that you
  315. have currently available through RISC OS; loaded into UniMode; or supplied
  316. by other modules. When run from the CLI you have some extra options
  317.  
  318. *ModeInfo [<Mode#>|-t]
  319.  
  320. With no parameters ModeInfo will return the information of all modes
  321. currently installed. If you supply a number in the range 0...127 the
  322. information (if any) of that mode only is given. Alternatively using the
  323. -t switch will give you the information on the current ('t'his) mode. The
  324. following information is supplied:
  325.  
  326.   - Modenumber
  327.   - Text:       number of columns times number of rows
  328.   - Graphics:   number of X-pixels times number of Y-pixels
  329.   - OS:         number of OS-pixels in X- and Y-direction
  330.   - Colours:    number of colours
  331.   - Memory:     amount of screenmemory required
  332.   - Type:       OS: RISC OS mode; Uni: UniMode mode; Sft: mode supplied
  333.                 by other module. In case of Uni the ID text is also
  334.                 displayed.
  335.  
  336.  
  337.  
  338. Extracting modes
  339. ----------------
  340.  
  341. When you want to define a working screenmode, starting from scratch is very
  342. difficult if not impossible. Therefore you are advised to base your mode on
  343. an existing modedefinition. This can be a RISC OS mode or an existing
  344. soft-mode. In the main menu the item 'Extract' leads to a dialogue window.
  345. At the right-hand side of the window there is a list of the monitortypes
  346. supported by UniMode2. You start by selecting the monitortype for which you
  347. want to design a mode. UniMode2 will (at startup) automagically select the
  348. type of monitor currently configured/connected. To the left are 128 icons
  349. numbered 0...127. Each icon represents a screenmode. The colour code is
  350. defined as follows:
  351.  
  352. Grey    Does not exist
  353. Black   RISC OS mode (Acorn)
  354. Green   UniMode2 mode
  355. Red     Screenmode supplied by other source.
  356.  
  357. The colour of the icons is defined when UniMode2 is started up. If there are
  358. any changes after that (loading new screenmode-definitions or modules)
  359. simply press the 'Scan Modes' button. When you click on one of the icons
  360. UniMode2 will attempt to extract the corresponding mode. The definition of
  361. the mode can then be edited or directly compiled and saved.
  362.  
  363. Where possible you should try to get rid of the red icons. If you do this
  364. you will find that you are saving a considerable amount of memory. There is
  365. a very simple procedure to do this. For every red icon do the following:
  366.  
  367. 1. Extract the mode into UniMode2
  368. 2. Compile the mode
  369. 3. Save the MDF to a file
  370. 4. Next time instead of loading the module that supplied this mode: load the
  371.    MDF. You can achieve this simply by replacing the *RMLoad <module>
  372.    command in the appropriate !Boot or !Run file by a *ModeLoad <MDFfile>
  373.    <Mode#> for each extracted mode.
  374.  
  375. Ofcourse you don't have to *ModeLoad all those MDFs. If there are modes that
  376. you never use you can save memory by not loading their definition at all. Or
  377. only when you need it.
  378.  
  379.  
  380. Editing a definition
  381. --------------------
  382.  
  383. Once extracted you may want to adjust the mode. Tailor it to the specific
  384. characteristics of your monitor. For this there are four windows which can
  385. be accessed via the 'Edit ⇨' option in the main menu:
  386.  
  387. o Specs...
  388.         This lets you select the prefered VidcEnhancer state (On or Off)
  389.         when the UniMode state is Auto (Achieved by *Vidc Auto).
  390.         Additionally you can select for which monitortype this mode should
  391.         be available. (NOTE: This does not mean that the mode will
  392.         automatically work properly on that monitortype! Usually you'll
  393.         just need to specify your own monitortype).
  394.  
  395. o ID Text...
  396.         In the ID Text window you can enter some copyright text and most of
  397.         all some mode information. The utility ModeInfo displays this
  398.         information as does UniMode when ever you load a MDF.
  399.  
  400. o VidcRegs...
  401.         In this window you can alter the contents of the various Vidc
  402.         Registers. The Vidc Registers are programmed into the Vidc when this
  403.         mode is selected. For more detailed information you should consult
  404.         the file 'PRM'.
  405.  
  406. o ModeVars...
  407.         In this window you can alter the ModeVariables. The ModeVariables
  408.         are used by RISC OS to display everything correctly on the screen.
  409.         For more detailed information you should consult the file 'PRM'.
  410.  
  411. If you actually want to start designing a new mode. Be warned: it's not
  412. easy. Read the file 'PRM' and if possible some other documentation about the
  413. VIDC.
  414.  
  415.  
  416. Compiling modes
  417. ---------------
  418.  
  419.  
  420.      
  421.  
  422.  
  423. Saving MDFs and MDSs
  424. --------------------
  425.  
  426.  
  427.  
  428. Loading modes
  429. -------------
  430.  
  431.  
  432.  
  433.  
  434.  @
  435.  
  436.  
  437.  
  438.  CompileMDS                             
  439.  ----------
  440.  
  441. { <UniMode$Dir>.Utils  }
  442.  
  443. This program compiles an MDS into an MDF. For safety reasons, you can only
  444. compile one file at a time. There are two ways of compiling an MDS. The
  445. first one is discussed in the paragraph '!UniMode'. The second way of
  446. compiling an MDS is via the CLI:
  447.  
  448. SYNTAX:
  449.  
  450. *CompileMDS [<Inputfile> [<Outputfile> [<Logfile>]]]
  451.  
  452. INPUT:
  453.  
  454. Input file      : This is the filename of the MDS. The directory is assumed
  455.                   to be the standard directory where all script files are
  456.                   stored: <UniModeMDS$Dir>.
  457.  
  458. Output file     : This is the filename of the MDF. The directory is assumed
  459.                   to be the standard directory where all definition-files
  460.                   are stored: <UniModeMDF$Dir>.
  461.  
  462. Run-time logging: CompileMDS reports on virtually everything it is doing
  463.                   (including any anomalies or errors that are encountered).
  464.                   You can redirect this output to virtually any destination
  465.                   (E.g.: null:, vdu:, printer:, serial:, ram:logfile,
  466.                   adfs::0.$.logfile, etc.) Remember that the destination
  467.                   must exist. Sending the logfile to a (non-existent)
  468.                   serial: device can lock the machine.
  469.  
  470. OUTPUT:
  471.  
  472. The program outputs a log to the specified file/device and an MDF to the
  473. specified path/filename.
  474.  
  475. NOTE:
  476.  
  477. * The program does NOT check whether an MDF already exists.
  478.  
  479. * An MDS is compiled in four passes.
  480.   During the first pass the compiler checks the MDS for spelling mistakes.
  481.   An error during this pass generally means a spelling mistake in one of the
  482.   variablenames or in either card. Refer to the log to see where the mistake
  483.   occurred.
  484.   During the second pass the compiler will attempt to evaluate the value
  485.   assigned to each variable. At the same time it will check whether the
  486.   variable is valid. For example HDSR is a VIDC register. It can only occur
  487.   in .VIDClist. If you would include this variable in .WorkspaceList the
  488.   compiler would generate an error.
  489.   Pass 3 is used to evaluate all the values and assign them to the
  490.   appropriate variable ready for compilation. During this pass the compiler
  491.   will report which variables will be programmed with which value. The third
  492.   pass is also used to do a so-called "Cross-check". During the cross-check
  493.   the compiler tries to find out whether the MDF being created COULD result
  494.   in a working mode or not. Any warnings generated during the cross-check
  495.   MIGHT indicate that the defined mode will not give a satisfiable display
  496.   on your monitor. The compiler will also try to calculate the mode's
  497.   rasterfrequency. This may deviate from the measured rasterfrequency by
  498.   ± 2Hz. Refer to your monitor's manual to see if this mode can be
  499.   displayed on your monitor. (Look in the technical specifications for
  500.   "Vertical Sync", "Vertical Synchronisation", "Raster Frequency" or
  501.   something similar. Typical values will be in a range between 50...100 Hz)
  502.   Finally the HB_Index of the mode is calculated. Refer to the chapter
  503.   'HB_Index' for more details.
  504.   The final pass (Pass 4) is the compilation pass. All that happens here is
  505.   the creation of the MDF from the results of the previous passes.
  506.  
  507. * If the Logfile is set to null: then errors and warnings are reported to
  508.   you through a standard text-window (provided that you're compiling from
  509.   the desktop). If the Logfile is set to anything else the errors or
  510.   warnings are put in the log. The compiler will display a message that an
  511.   error or warning has occurred and refer you to the log.
  512.  
  513.  
  514.  Expand / ExpandAll                     
  515.  ------------------
  516.  
  517. { <UniMode$Dir>.Utils }
  518.  
  519. These programs are used to convert an MDF into an MDS. The functional
  520. difference between the two is that 'Expand' operates on one file at a time
  521. while 'ExpandAll' operates on an entire directory. You can optionally supply
  522. the required parameters at the commandline.
  523.  
  524. SYNTAX:
  525.  
  526. *Expand [<Inputfile> [<Outputfile>]]
  527. *ExpandAll [<SourcePath> [<DestinationPath>]]
  528.  
  529. INPUT:
  530.  
  531. Input file      :  This is the name of the MDF. The directory is
  532.                   assumed to be the standard directory where all
  533.                   definition-files are located: <UniModeMDF$Dir>.
  534.  
  535. Output file     :  This is the name of the MDS. The directory is
  536.                   assumed to be the standard directory where all script
  537.                   files are located: <UniModeMDS$Dir>.
  538.  
  539. Source Path     :  This is the name of the path where the MDF-s
  540.                   can be found. This is <UniModeMDF$Dir>. by default.
  541.  
  542. Destination Path:  This is the name of the path where the MDS-s
  543.                   must be stored. This is <UniModeMDS$Dir>. by default.
  544.  
  545. OUTPUT:
  546.  
  547. The programs output the appropriate MDS(-s) to the specified path/filename.
  548.  
  549. NOTE:
  550.  
  551. * 'ExpandAll' is recursive, i.e. it will also expand files in directories
  552. inside the one you dragged to the Input window.
  553. * 'Expand' can also be accessed by clicking 'Expand' in the !UniMode menu on
  554. the desktop. Refer to the paragraph '!UniMode' for more details.
  555.  
  556.  
  557.  Extract / ExtractAll                   
  558.  --------------------
  559.  
  560. { <UniMode$Dir>.Utils }
  561.  
  562. These programs can be used to extract the mode definitions from a RAM-based
  563. module (including UniMode) and thus create an MDF.
  564.  
  565. Since copyright laws apply to some of these mode definitions, you may
  566. extract them for use in your OWN version of UniversalMode, but you may not
  567. pass these MDF-s to others.
  568.  
  569. It is not necessary to disassemble a mode-supplying module. By simply
  570. calling OS_ServiceCall &50 'Extract' and 'ExtractAll' can find out all that
  571. is needed to know about a given mode in order to compile an MDF. The
  572. functional difference between these two programs is that 'Extract' extracts
  573. one mode at a time while 'ExtractAll' extracts all modes defined by
  574. RAM-based modules. You can optionally supply the required parameters at the
  575. commandline.
  576.  
  577. SYNTAX:
  578.  
  579. *Extract [<Modenumber> [<Outputfile>]]
  580. *ExtractAll [<CommonPart> [Q|S]]
  581.  
  582. INPUT:
  583.  
  584. 'Extract' displays the available modes. Type in the number of the mode that
  585. you wish to extract. You are offered a path/filename which you can change to
  586. your own liking.
  587.  
  588. 'ExtractAll' displays the available modes. You need to enter the common part
  589. of the path/file-name. 'ExtractAll' appends the modenumber to this name and
  590. saves the MDF-s. (E.g. if the modes 50, 51 and 52 are available and the
  591. common part is specified as 'm'. Then the modes are saved as 'm50', 'm51'
  592. and 'm52')
  593.  
  594. 'ExtractAll' lets you choose whether to "(Q)uery each" or "(S)ave all".
  595. Enter 'Q' and the program will let you change the filename before saving it.
  596. Delete the filename and that mode will be skipped. Enter 'S' and all modes
  597. will be extracted.
  598.  
  599. OUTPUT:
  600.  
  601. Both programs store the MDF-s at the specified path/filename.
  602.  
  603. NOTE:
  604.  
  605. * RISC OS modes can not be extracted, because the UtilityModule does not
  606. reply to OS_ServiceCall &50 and no other means of retrieving this data is
  607. supplied by RISC OS.
  608.  
  609. * Both 'Extract' and 'ExtractAll' also extract the soft-modes loaded by
  610. UniMode. If you do not want this to happen, you should enter
  611. *RMKill UniversalMode before starting either of these programs.
  612.  
  613. * 'Extract' and 'ExtractAll' create a MDS with the following MachineSpecs
  614. by default:
  615.  
  616. .MachineSpecs
  617.  
  618.   VidcOn
  619.   MultiScan
  620.  
  621.  
  622.  
  623.  
  624.  ExtractOS2 / ExtractOS3                
  625.  -----------------------
  626.  
  627. { <UniMode$Dir>.Utils }
  628.  
  629. As mentioned above, RISC OS modes can not be extracted by 'Extract(All)'. In
  630. some circumstances, however, you need the contents of the RISC OS registers
  631. in order to make a working MDF. For instance: If you want to use an MDF
  632. based on a RISC OS 3 BaseMode on a RISC OS 2 machine, you have got a
  633. problem. The best way around this, is to set BaseMode to the nearest
  634. RISC OS 2 BaseMode and then define ALL VIDC registers with the RISC OS 3
  635. values.
  636.  
  637. Using 'ExtractOSn':
  638.  
  639. 1. Create a RAM-disc of at least 112k.
  640. 2. Create a directory 'Modes' on the RAM-disc.
  641. 3. Create a directory 'ModeScript' on the RAM-disc.
  642. 4. a. On a RISC OS 2 machine run the program 'ExtractOS2'
  643.    b. On a RISC OS 3 machine run the program 'ExtractOS3'
  644. 5. The RAM-disc now contains the MDF's and MDS's of the OS-modes. (All MDF's
  645.    are automatically expanded using 'ExpandAll'
  646.  
  647. Since distribution of these definitions may violate Acorn's copyright we
  648. have not included the RISC OS MDF's in the package.
  649.  
  650. INPUT:
  651.  
  652. -
  653.  
  654. OUTPUT:
  655.  
  656. These programs create MDF's of RISC OS modes. The MDF's are stored on the
  657. RAM-disc. The program 'ExpandAll' is called to create the MDS's.
  658.  
  659. NOTE:
  660.  
  661. * The presence of the directories 'Modes' and 'ModeScript' on the
  662.   RAM-disc is assumed.
  663. * It should be obvious that 'ExtractOS2' cannot be used on a RISC OS 3
  664.   machine and vv.
  665. * It is very likely that 'ExtractOS3' only works on A5000 machines and not
  666.   on other machines running RISC OS 3.
  667. * It is also very likely that 'ExtractOS2' and 'ExtractOS3' do not work on
  668.   an A540 (different OS versions). We haven't tested this so if you have an
  669.   A540, let us know!
  670.  
  671.  
  672.  
  673.  InfoMDF                        
  674.  -------
  675.  
  676. { <UniMode$Dir>.Utils }
  677.  
  678. 'InfoMDF' gives information about a given MDF.
  679.  
  680. SYNTAX:
  681.  
  682. *InfoMDF [<Inputfile>]
  683.  
  684. INPUT:
  685.  
  686. Mode file       : This is the name of the MDF. The directory is
  687.                   assumed to be the standard directory where all
  688.                   definition-files are located: <UniModeMDF$Dir>.
  689.  
  690. OUTPUT:
  691.  
  692. Displays some information about the modedefinition. Depending upon the
  693. values stored in the MDF different information may be given. One or more of
  694. the following items may be included in the output:
  695.  
  696. Item                            Description
  697. -----------------------------------------------------------------------------
  698.  
  699. 'Auto'-mode VidcEnhancer     :  When UniMode is in the 'Auto'-mode the
  700.                                 VidcEnhancer will be switched to this state.
  701.                                 (ON|OFF)
  702.  
  703. BaseMode used                :  The modenumber of the BaseMode that has been
  704.                                 defined in '.VIDCList' and '.WorkspaceList'.
  705.                                 If the BaseMode defined in '.WorkspaceList'
  706.                                 differs from the one defined in '.VIDCList'
  707.                                 then both BaseModes are specified :
  708.                                 <VidcList> [/ <WorkspaceList>]
  709.  
  710. Monitors supported           :  This item lists all the monitortypes for
  711.                                 which this MDF is valid.
  712.  
  713. Rasterfrequency              :  The rasterfrequency of the mode when the
  714.                                 VidcEnhancer is switched to its
  715.                                 'Auto'-mode setting followed by the
  716.                                 rasterfrequency of the mode when the
  717.                                 VidcEnhancer is switched to the opposite
  718.                                 state between brackets.
  719.  
  720. Linefrequency                :  The linefrequency of the mode when the
  721.                                 VidcEnhancer is switched to its
  722.                                 'Auto'-mode setting followed by the
  723.                                 linefrequency of the mode when the
  724.                                 VidcEnhancer is switched to the opposite
  725.                                 state between brackets.
  726.  
  727. Broadcaststandard            :  The utility evaluates whether the mode can
  728.                                 be used as a BroadcastStandardMode or not.
  729.                                 If it can't be used as a BSDM in its
  730.                                 'Auto'-mode setting then the result will be
  731.                                 "NO". If it can be used as a BSDM in its
  732.                                 'Auto'-mode setting then the result will be
  733.                                 "YES". The result will be "(YES)" if the
  734.                                 mode can be used as a BSDM when the
  735.                                 VidcEnhancer is switched to the opposite
  736.                                 state of the mode's 'Auto'-mode setting.
  737.  
  738. Number of characters per line:  Obviously, the number of characters/line
  739.  
  740. Number of lines              :  The number of textlines in the display.
  741.  
  742. X resolution                 :  The number of horizontal pixels.
  743.  
  744. Y resolution                 :  The number of vertical pixels in the display
  745.  
  746. Number of colours            :  The number of colours that can be displayed.
  747.  
  748. X-eigenfactor                :  Refer to the Programmer's Guide. Section:
  749.                                 "Mode Variables". The description of the 
  750.                                 variable 'XEigFactor'
  751.  
  752. Y-eigenfactor                :  Refer to the Programmer's Guide. Section:
  753.                                 "Mode Variables". The description of the
  754.                                 variable 'YEigFactor'
  755.  
  756. Screenbuffer size            :  The number kbytes of screenmemory required. 
  757.  
  758. ModeFlags                    :  Each bit in the 'ModeFlags' variable is
  759.                                 displayed here if it is set. Refer to the
  760.                                 Programmer's Guide; Section: "Mode
  761.                                 Variables". The description of the variable
  762.                                 'ModeFlags'.
  763.  
  764. NOTE:
  765. 'InfoMDF' can also be accessed through the desktop front-end. Refer to the
  766. paragraph called "!UniMode" for more details.
  767.  
  768.  
  769.  
  770.  ModeInfo                       
  771.  --------
  772.  
  773. { <UniMode$Dir>.Utils }
  774.  
  775. 'ModeInfo' gives some basic information about the modes that you have
  776. currently available through RISC OS; loaded into UniMode; or supplied by
  777. other modules.
  778.  
  779. SYNTAX:
  780.  
  781. *ModeInfo [<Mode#>]
  782.  
  783. INPUT:
  784.  
  785. -
  786.  
  787. OUTPUT:
  788.  
  789. With no parameters ModeInfo will return the information of all modes
  790. currently installed. If you supply a number in the range 0...127 the
  791. information (if any) of that mode only is given.
  792. The following information is supplied:
  793.  
  794.   - Modenumber
  795.   - Text:       number of columns by number of rows
  796.   - Graphics:   number of X-pixels by number of Y-pixels
  797.   - OS:         number of OS-pixels in X- and Y-direction
  798.   - Colours:    number of colours
  799.   - Memory:     amount of screenmemory required
  800.   - Type:       RISC OS mode or soft-mode
  801.  
  802.  
  803.  
  804.  UMUserLib                      
  805.  ---------
  806.  
  807. { <UniMode$Dir>.Utils }
  808.  
  809. 'UMUserLib' is a library. It is linked into 'Expand(All)' and 'CompileMDS'.
  810. The library contains a number of functions. These functions can be used in
  811. the definition of the MDF as substitutes for numerical values. See the
  812. Programmer's Guide for more details.
  813.  
  814.  
  815.  UniModeLib                     
  816.  ----------
  817.  
  818. { <UniMode$Dir>.Utils }
  819.  
  820. 'UniModeLib' is also a library. It is linked into all utilities including
  821. the !RunImage. This library supplies the shared resources for the programs
  822. in the package. The contents of this library should not be altered by the
  823. user. If you wish to add FuNctions or PROCedures you should add them to
  824. 'UMUserLib' instead.
  825.  
  826.  
  827.  TimeRaster                     
  828.  ----------
  829.  
  830. { <UniMode$Dir>.Utils }
  831.  
  832. This Utility can be used to measure the rasterfrequency of the current mode.
  833. The result may deviate ± 2Hz from what is calculated by CompileMDS. This
  834. deviation is due to rounding differences.
  835.  
  836.  
  837.  The HB_Index                    
  838.  ============
  839.  
  840. The HB_Index is a number which gives a rough indication of the redraw-speed
  841. of a mode. The HB_Index is calculated as follows:
  842.  
  843.                              1000
  844.                  1) R = ---------------
  845.                         Rasterfrequency
  846.  
  847.  
  848.                         (bpp * (XWindLimit+1) * (YWindLimit+1) * 1000)
  849.                  2) M = ----------------------------------------------
  850.                                                 8
  851.  
  852.  
  853.                                         M
  854.                                  4E7 - ---
  855.                                         R
  856.                   3) HB_Index = -----------
  857.                                     4E7
  858.  
  859. The result is a number between 0.00 and 1.00. A low number typically means a
  860. slow mode, while a higher number suggests a faster mode. The redraw-speed of
  861. a mode can be experienced if the WIMP has to redraw a complete screen - with
  862. many different windows overlapping each other - after eg. a mode change
  863. (Press F12 followed by [RETURN] to simulate a mode change). A slow mode
  864. will take a longer time to redraw the screen. As a result a fast mode
  865. indicates that the ARM has more time left to perform other operations.
  866. Generally you will want to perform time-expensive tasks such as printing
  867. etc. in a fast-mode. Eg. Mode 0 (which is often used for this purpose) has
  868. an HB_Index of approximately 0.97 while Mode 28 (clearly a slower mode) has
  869. an HB_Index of 0.55. The HB_Index depends on the Rasterfrequency of the
  870. mode. Therefore the compiler calculates an HB_Index for the mode for both
  871. VidcEnhancer states. With the currently available hardware (ARM2/ARM3 and 8
  872. or 12 MHz MEMC's) modes with an HB_Index higher than 0.55 are usually
  873. experienced as reasonably fast modes. Modes with an HB_Index lower than 0.45
  874. will be experienced as slow.
  875.  
  876.